home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue59 / Clinic / IBXTest2U.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-05-30  |  1.1 KB  |  52 lines

  1. unit IBXTest2U;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Grids, DBGrids, Db, IBDatabase, IBCustomDataSet, IBTable;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     IBDatabase1: TIBDatabase;
  12.     IBTable1: TIBTable;
  13.     IBTransaction1: TIBTransaction;
  14.     DataSource1: TDataSource;
  15.     DBGrid1: TDBGrid;
  16.     procedure FormCreate(Sender: TObject);
  17.     procedure IBDatabase1Login(Database: TIBDatabase;
  18.       LoginParams: TStrings);
  19.   private
  20.     { Private declarations }
  21.   public
  22.     { Public declarations }
  23.   end;
  24.  
  25. var
  26.   Form1: TForm1;
  27.  
  28. implementation
  29.  
  30. {$R *.DFM}
  31.  
  32. procedure TForm1.FormCreate(Sender: TObject);
  33. begin
  34.   IBDatabase1.DatabaseName :=
  35.     'D:\Program Files\InterBase Corp\InterBase\examples\database\Employee.gdb';
  36.   IBTable1.Open
  37. end;
  38.  
  39. {$define CateringForIBXLoginBug}
  40.  
  41. procedure TForm1.IBDatabase1Login(Database: TIBDatabase;
  42.   LoginParams: TStrings);
  43. begin
  44.   LoginParams.Values['password'] := 'masterke';
  45. {$ifdef CateringForIBXLoginBug}
  46.   LoginParams.Values['xassword'] := 'masterke';
  47. {$endif}
  48.   LoginParams.Values['user_name'] := 'sysdba'
  49. end;
  50.  
  51. end.
  52.